1. Field of the Invention
The present invention relates to an image processing apparatus and method for preventing degradation in field-of-view rate due to pixel reduction by the number of ring pixels when image processing is performed.
2. Description of the Related Art
Conventionally, for Bayer data (original image data) inserted from an imaging element when an image is created by an image capturing device such as a digital camera, image processing such as conversion into YUV data, noise reduction, and image correction (e.g., edge emphasis), as well as image conversion such as enlargement, reduction, and copying, are performed.
During this image processing, the original data to be processed is input to a sequential image processing part line-by-line in a top-to-bottom order. In such image processing, a new pixel may be created by referring to a plurality of pixels. If image processing is performed without any processing on the original image data, as shown on the left side of FIG. 1, the original image data, which is size-reduced by pixels (i.e. ring pixels) around the original image data, is processed, thus obtaining image data. To prevent degradation in field-of-view rate due to size-reduction of the output image after image processing of the input image, as indicated by the dotted line on the right side of FIG. 1, a ring pixel frame over the perimeter of the original image data as many as ring pixels around the input image data lost due to image processing is provided prior to image processing (see Japanese Publication No. 2010-153932).
For the input image data, image conversion known as pixel copy, which enlarges an input image two times, may also be performed after image processing as well as image processing which outputs image data of the same number of pixels. A structure in which image processing and image conversion are performed in succession is shown in FIG. 2. The structure includes a Synchronous Dynamic Random Access Memory 4A in which the original image data is memorized, an input Direct Memory Access (DMA) 51A (hereinafter a reading part) for reading the original image data from the SDRAM 4A line-by-line, an image processing part 52A which includes a first filter 53A, a second filter 54A, and a third filter 55A which are directly connected to perform image processing with respect to a line read by the reading part 51A, an image resizing part 56A directly connected to the image processing part 52A to enlarge or copy the image-processed line, and an output DMA 58A which is an output part for memorizing the enlarged or copied line in the SDRAM 4A.
When enlarging a line such as outputting two lines for one line, the image resizing part 56A needs more time to output and memorize the lines in the SDRAM 4A than when inputting the line. If a new line is input during an output operation of the image resizing part 56A, a normal operation cannot be performed, such that a request signal for requesting a timing for inputting a line necessary for a next operation to the image resizing part 56A after completion of the output operation is input to the reading part 51A. According to the request signal, the reading part 51A reads a new line, and the read line is input to the first filter 53A, then the second filter 54A, and then the third filter 55A for image processing, after which a new line is input to the image resizing part 56A.
However, in this structure, data for a lower ring line of a ring pixel frame shown in FIG. 3 cannot be output. Specifically, when the reading part 51A reads a lower line of the original image data, since data of the lower ring line has not been memorized in the SDRAM 4A, the reading part 51A cannot perform a corresponding operation even if the request signal is input to the reading part 51A. As a result, an output operation corresponding to the lower ring line cannot continue. If the image processing part 52A is not directly connected to the image resizing part 56A to prevent such a problem, the bandwidth of the SDRAM cannot be reduced, thereby delaying image processing operations.